<template>
	<view class="content">
		<view class="list-type">
			<view class="list-type-boxs" @tap="listType(1)" :class="[type == 1 ? 'list-type-boxs-active' : '']">我的收益<view v-if="type==1"></view>
			</view>
			<view class="list-type-boxs" @tap="listType(2)" :class="[type == 2 ? 'list-type-boxs-active' : '']">我的邀请<view v-if="type==2"></view>
			</view>
		</view>
		<view class="list">
			<view class="list-boxs">
				<view class="list-boxs-l">好友账号</view>
				<view class="list-boxs-m">收益类型</view>
				<view class="list-boxs-r" style="color: #111111;">收益金额</view>
			</view>
			<view class="list-boxs">
				<view class="list-boxs-l">18867542208</view>
				<view class="list-boxs-m">最终受益</view>
				<view class="list-boxs-r">50.00</view>
			</view>
			<view class="list-boxs">
				<view class="list-boxs-l">18867542208</view>
				<view class="list-boxs-m">在途收益</view>
				<view class="list-boxs-r">50.00</view>
			</view>
			<view class="list-boxs">
				<view class="list-boxs-l">18867542208</view>
				<view class="list-boxs-m">失效收益</view>
				<view class="list-boxs-r" :class="shouyiType == 3 ? 'list-boxs-r-active' : ''">50.00</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		components: {},
		data() {
			return {
				type: 1, //1.我的收益  2.我的邀请
				shouyiType: 3, //收益类型 1.最终受益  2.在途收益  3.失效收益
			}
		},
		onLoad(option) {
			this.type = option.type;

		},
		methods: {
			listType(index) {
				this.type = index
			}
		}
	}
</script>

<style>
	page {
		background: rgba(245, 245, 245, 1);
	}

	.content {
		width: 100%;
		height: 100%;
	}

	.list-type {
		width: 100%;
		height: 40px;
		display: flex;
		flex-wrap: wrap;
		background: rgba(255, 255, 255, 1);
		border-top: 1px solid rgba(245, 245, 245, 1);
		margin-bottom: 5px;
	}

	.list-type-boxs {
		width: 50%;
		height: 40px;
		line-height: 40px;
		text-align: center;
		font-size: 14px;
		font-family: PingFang;
		font-weight: 500;
		color: rgba(153, 153, 153, 1);
		position: relative;
	}

	.list-type-boxs-active {
		color: rgba(255, 67, 56, 1);
	}

	.list-type-boxs view {
		position: absolute;
		bottom: 0;
		height: 1px;
		left: 20px;
		right: 20px;
		background: rgba(255, 67, 56, 1);
	}

	.list-boxs {
		width: 100%;
		height: 40px;
		margin-bottom: 1px;
		background-color: rgba(255, 255, 255, 1);
		display: flex;
		flex-wrap: wrap;
		position: relative;
		font-size: 14px;
		font-family: PingFang SC;
		font-weight: 400;
		color: rgba(51, 51, 51, 1);
	}

	.list-boxs-l {
		position: absolute;
		left: 12px;
		line-height: 40px;
	}

	.list-boxs-r {
		position: absolute;
		right: 12px;
		line-height: 40px;
		color:rgba(248,28,28,1);
	}

	.list-boxs-m {
		width: 100%;
		text-align: center;
		line-height: 40px;
	}
	
	.list-boxs-r-active {
		color:rgba(153,153,153,1);
	}
</style>
